package com.cans.proxy;

import com.cans.api.IUserDao;
import com.cans.dto.CansResult;

/**
 * @author cans
 * @date 2018/3/4
 */
public class UserDaoProxy implements IUserDao{

    private IUserDao target;

    public UserDaoProxy(IUserDao target){
        this.target = target;
    }

    @Override
    public CansResult save() {
        // 记录日志
        System.out.println("记录日志--------------");

        CansResult res = target.save();

        System.out.println("打印返回值:" + res);
        return res;
    }
}
